Redact headers when exporting internal telemetry through OTLP#14756
Merged
mx-psi merged 5 commits intoopen-telemetry:mainfrom Apr 6, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (76.47%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #14756 +/- ##
==========================================
- Coverage 91.24% 91.22% -0.02%
==========================================
Files 697 698 +1
Lines 44647 44681 +34
==========================================
+ Hits 40738 40761 +23
- Misses 2769 2775 +6
- Partials 1140 1145 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
The two failing tests seem to also be failing on main. |
evan-bradley
approved these changes
Mar 12, 2026
Contributor
evan-bradley
left a comment
There was a problem hiding this comment.
I didn't deeply check which keys need to be redacted, but overall this looks good to me.
jmacd
approved these changes
Mar 13, 2026
Contributor
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
mx-psi
approved these changes
Apr 6, 2026
Merged
via the queue into
open-telemetry:main
with commit Apr 6, 2026
26800af
65 of 66 checks passed
TimoBehrendt
pushed a commit
to TimoBehrendt/tracebasedlogsampler
that referenced
this pull request
Apr 22, 2026
…ocessortest to v0.150.0 (#57) This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [go.opentelemetry.io/collector/processor/processortest](https://github.com/open-telemetry/opentelemetry-collector) | `v0.149.0` → `v0.150.0` |  |  | --- ### Release Notes <details> <summary>open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/processor/processortest)</summary> ### [`v0.150.0`](https://github.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v1560v01500) [Compare Source](open-telemetry/opentelemetry-collector@v0.149.0...v0.150.0) ##### 💡 Enhancements 💡 - `all`: Update semconv package from 1.38.0 to 1.40.0 ([#​15095](open-telemetry/opentelemetry-collector#15095)) - `cmd/mdatagen`: Only allow the `ToVersion` feature flag attribute to be set for the `Stable` and `Deprecated` stages. ([#​15040](open-telemetry/opentelemetry-collector#15040)) To better match the feature flag README (<https://github.com/open-telemetry/opentelemetry-collector/blob/main/featuregate/README.md#feature-lifecycle>). ##### 🧰 Bug fixes 🧰 - `exporter/debug`: Guard from out of bounds profiles dictionary indices ([#​14803](open-telemetry/opentelemetry-collector#14803)) - `pdata/pprofile`: create a copy when the input is marked as read-only ([#​15080](open-telemetry/opentelemetry-collector#15080)) - `pkg/otelcol`: Fix missing default values in unredacted print-config command by introducing confmap.WithUnredacted MarshalOption. ([#​14750](open-telemetry/opentelemetry-collector#14750)) Resolves an issue where the unredacted mode output omitted all default-valued options. By introducing a new MarshalOption to disable redaction directly at the confmap encoding level, the unredacted mode now preserves all component defaults natively without requiring post-processing. - `pkg/service`: Headers on the internal telemetry OTLP exporter are now redacted when the configuration is marshaled ([#​14756](open-telemetry/opentelemetry-collector#14756)) <!-- previous-version --> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41LjQiLCJ1cGRhdGVkSW5WZXIiOiI0My41LjQiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=--> Reviewed-on: https://gitea.t000-n.de/t.behrendt/tracebasedlogsampler/pulls/57 Reviewed-by: t.behrendt <t.behrendt@noreply.localhost> Co-authored-by: Renovate Bot <renovate@t00n.de> Co-committed-by: Renovate Bot <renovate@t00n.de>
TimoBehrendt
pushed a commit
to TimoBehrendt/tracebasedlogsampler
that referenced
this pull request
Apr 23, 2026
…1.56.0 (#52) This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [go.opentelemetry.io/collector/confmap](https://github.com/open-telemetry/opentelemetry-collector) | `v1.55.0` → `v1.56.0` |  |  | --- ### Release Notes <details> <summary>open-telemetry/opentelemetry-collector (go.opentelemetry.io/collector/confmap)</summary> ### [`v1.56.0`](https://github.com/open-telemetry/opentelemetry-collector/blob/HEAD/CHANGELOG.md#v1560v01500) ##### 💡 Enhancements 💡 - `all`: Update semconv package from 1.38.0 to 1.40.0 ([#​15095](open-telemetry/opentelemetry-collector#15095)) - `cmd/mdatagen`: Only allow the `ToVersion` feature flag attribute to be set for the `Stable` and `Deprecated` stages. ([#​15040](open-telemetry/opentelemetry-collector#15040)) To better match the feature flag README (<https://github.com/open-telemetry/opentelemetry-collector/blob/main/featuregate/README.md#feature-lifecycle>). ##### 🧰 Bug fixes 🧰 - `exporter/debug`: Guard from out of bounds profiles dictionary indices ([#​14803](open-telemetry/opentelemetry-collector#14803)) - `pdata/pprofile`: create a copy when the input is marked as read-only ([#​15080](open-telemetry/opentelemetry-collector#15080)) - `pkg/otelcol`: Fix missing default values in unredacted print-config command by introducing confmap.WithUnredacted MarshalOption. ([#​14750](open-telemetry/opentelemetry-collector#14750)) Resolves an issue where the unredacted mode output omitted all default-valued options. By introducing a new MarshalOption to disable redaction directly at the confmap encoding level, the unredacted mode now preserves all component defaults natively without requiring post-processing. - `pkg/service`: Headers on the internal telemetry OTLP exporter are now redacted when the configuration is marshaled ([#​14756](open-telemetry/opentelemetry-collector#14756)) <!-- previous-version --> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41LjQiLCJ1cGRhdGVkSW5WZXIiOiI0My41LjQiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=--> Reviewed-on: https://gitea.t000-n.de/t.behrendt/tracebasedlogsampler/pulls/52 Reviewed-by: t.behrendt <t.behrendt@noreply.localhost> Co-authored-by: Renovate Bot <renovate@t00n.de> Co-committed-by: Renovate Bot <renovate@t00n.de>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Currently, when exporting the Collector's internal telemetry through OTLP, headers defined on the OTLP exporter will be marshaled in plain text when the Collector's configuration is exported (through the OpAMP extension, for instance). This PR adds a
confmap.Marshalerimplementation to the configuration structs which overwrites the header values with[REDACTED], as if the fields usedconfigopaque.String(which would be hard to implement since they are defined in the externalotelconfpackage).To be honest I'm not super pleased with the dynamic way I implemented it in terms of performance, but I think it's the most reasonable way to implement it without adding too much complexity for something that should ideally be fixed at the
otelconflevel. It should also be adaptable to other cases where we need to redact marshaled configs after the fact, if necessary.The changes to the existing test data were done to accommodate the new
Marshaltest (in some cases,assert.Equalwill complain that a value isn't an untyped nil, but there is no way to produce one with our unmarshaling process), and to avoid making the input and output look unnecessarily different (e.g. for the capitalization of the verbosity levels).Testing
I added some tests to
otelconftelemetry/internal/migrationwhich check the output of marshaling the configuration.